package com.ruoyi.project.api.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ruoyi.project.api.service.DbcenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author anan.
 * @version 1.0
 * @create 2021-04-12 15-44
 */
@Service
public class DbcenterServiceImpl implements DbcenterService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    @DS("dbcenter")
    public List select(String sql)
    {
        return jdbcTemplate.queryForList(sql);
    }
}
